<div>
    <p><%= link_to ">>创建主题文章", :controller=>"novel", :action=>"new" if  @user.id == session[:user_id] %></p>
    <% novels = Novel.find :all, :conditions=>["user_id=?", @user.id], :order=>"created_at DESC"
       stas = "还没有创建过任何主题文章"
       stas = "已经创建 #{novels.size} 主题文章" unless novels.empty?
    %>
    <h4><%= stas %></h4>
    <%
       novels.each do |novel|
    %>
        <p class="title_line"><%= time_format novel.created_at %>
            发起: <%= link_to novel.title, :controller=>"novel", :action=>"show", :id=>novel.id -%>
            <%= link_to "（编辑）", :controller=>"novel", :action=>"edit", :id=>novel.id if  @user.id == session[:user_id]-%></p>

        <p><%= simple_format truncate(novel.summary, :length=>160) -%></p>
    <%
       end
    %>
</div>